/*
 * An wb_fpga_i2c_bus_device driver for fpga i2c device function
 *
 * Copyright (C) 2024 Micas Networks Inc.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

#include <linux/module.h>
#include <linux/io.h>
#include <linux/device.h>
#include <linux/delay.h>
#include <linux/platform_device.h>

#include <fpga_i2c.h>

static int g_wb_fpga_i2c_debug = 0;
static int g_wb_fpga_i2c_error = 0;

module_param(g_wb_fpga_i2c_debug, int, S_IRUGO | S_IWUSR);
module_param(g_wb_fpga_i2c_error, int, S_IRUGO | S_IWUSR);

#define WB_FPGA_I2C_DEBUG_VERBOSE(fmt, args...) do {                                        \
    if (g_wb_fpga_i2c_debug) { \
        printk(KERN_INFO "[WB_FPGA_I2C][VER][func:%s line:%d]\r\n"fmt, __func__, __LINE__, ## args); \
    } \
} while (0)

#define WB_FPGA_I2C_DEBUG_ERROR(fmt, args...) do {                                        \
    if (g_wb_fpga_i2c_error) { \
        printk(KERN_ERR "[WB_FPGA_I2C][ERR][func:%s line:%d]\r\n"fmt, __func__, __LINE__, ## args); \
    } \
} while (0)

static fpga_i2c_bus_device_t fpga_i2c_bus_device_data0 = {
    .adap_nr                    = 2,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x100,
    .i2c_filter                 = 0x104,
    .i2c_stretch                = 0x108,
    .i2c_ext_9548_exits_flag    = 0x10c,
    .i2c_ext_9548_addr          = 0x110,
    .i2c_ext_9548_chan          = 0x114,
    .i2c_in_9548_chan           = 0x118,
    .i2c_slave                  = 0x11c,
    .i2c_reg                    = 0x120,
    .i2c_reg_len                = 0x130,
    .i2c_data_len               = 0x134,
    .i2c_ctrl                   = 0x138,
    .i2c_status                 = 0x13c,
    .i2c_data_buf               = 0x180,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x28,
    .i2c_reset_on               = 0x00000001,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_i2c_bus_device_data1 = {
    .adap_nr                    = 3,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x200,
    .i2c_filter                 = 0x204,
    .i2c_stretch                = 0x208,
    .i2c_ext_9548_exits_flag    = 0x20c,
    .i2c_ext_9548_addr          = 0x210,
    .i2c_ext_9548_chan          = 0x214,
    .i2c_in_9548_chan           = 0x218,
    .i2c_slave                  = 0x21c,
    .i2c_reg                    = 0x220,
    .i2c_reg_len                = 0x230,
    .i2c_data_len               = 0x234,
    .i2c_ctrl                   = 0x238,
    .i2c_status                 = 0x23c,
    .i2c_data_buf               = 0x280,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x28,
    .i2c_reset_on               = 0x00000002,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_i2c_bus_device_data2 = {
    .adap_nr                    = 4,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x300,
    .i2c_filter                 = 0x304,
    .i2c_stretch                = 0x308,
    .i2c_ext_9548_exits_flag    = 0x30c,
    .i2c_ext_9548_addr          = 0x310,
    .i2c_ext_9548_chan          = 0x314,
    .i2c_in_9548_chan           = 0x318,
    .i2c_slave                  = 0x31c,
    .i2c_reg                    = 0x320,
    .i2c_reg_len                = 0x330,
    .i2c_data_len               = 0x334,
    .i2c_ctrl                   = 0x338,
    .i2c_status                 = 0x33c,
    .i2c_data_buf               = 0x380,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x28,
    .i2c_reset_on               = 0x00000004,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_i2c_bus_device_data3 = {
    .adap_nr                    = 5,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x400,
    .i2c_filter                 = 0x404,
    .i2c_stretch                = 0x408,
    .i2c_ext_9548_exits_flag    = 0x40c,
    .i2c_ext_9548_addr          = 0x410,
    .i2c_ext_9548_chan          = 0x414,
    .i2c_in_9548_chan           = 0x418,
    .i2c_slave                  = 0x41c,
    .i2c_reg                    = 0x420,
    .i2c_reg_len                = 0x430,
    .i2c_data_len               = 0x434,
    .i2c_ctrl                   = 0x438,
    .i2c_status                 = 0x43c,
    .i2c_data_buf               = 0x480,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x28,
    .i2c_reset_on               = 0x00000008,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_i2c_bus_device_data4 = {
    .adap_nr                    = 6,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x500,
    .i2c_filter                 = 0x504,
    .i2c_stretch                = 0x508,
    .i2c_ext_9548_exits_flag    = 0x50c,
    .i2c_ext_9548_addr          = 0x510,
    .i2c_ext_9548_chan          = 0x514,
    .i2c_in_9548_chan           = 0x518,
    .i2c_slave                  = 0x51c,
    .i2c_reg                    = 0x520,
    .i2c_reg_len                = 0x530,
    .i2c_data_len               = 0x534,
    .i2c_ctrl                   = 0x538,
    .i2c_status                 = 0x53c,
    .i2c_data_buf               = 0x580,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x28,
    .i2c_reset_on               = 0x00000010,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_i2c_bus_device_data5 = {
    .adap_nr                    = 7,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x600,
    .i2c_filter                 = 0x604,
    .i2c_stretch                = 0x608,
    .i2c_ext_9548_exits_flag    = 0x60c,
    .i2c_ext_9548_addr          = 0x610,
    .i2c_ext_9548_chan          = 0x614,
    .i2c_in_9548_chan           = 0x618,
    .i2c_slave                  = 0x61c,
    .i2c_reg                    = 0x620,
    .i2c_reg_len                = 0x630,
    .i2c_data_len               = 0x634,
    .i2c_ctrl                   = 0x638,
    .i2c_status                 = 0x63c,
    .i2c_data_buf               = 0x680,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x28,
    .i2c_reset_on               = 0x00000020,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_i2c_bus_device_data6 = {
    .adap_nr                    = 199,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x1a00,
    .i2c_filter                 = 0x1a04,
    .i2c_stretch                = 0x1a08,
    .i2c_ext_9548_exits_flag    = 0x1a0c,
    .i2c_ext_9548_addr          = 0x1a10,
    .i2c_ext_9548_chan          = 0x1a14,
    .i2c_in_9548_chan           = 0x1a18,
    .i2c_slave                  = 0x1a1c,
    .i2c_reg                    = 0x1a20,
    .i2c_reg_len                = 0x1a30,
    .i2c_data_len               = 0x1a34,
    .i2c_ctrl                   = 0x1a38,
    .i2c_status                 = 0x1a3c,
    .i2c_data_buf               = 0x1b00,
    .i2c_data_buf_len           = 0x100,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x28,
    .i2c_reset_on               = 0x00000040,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data0 = {
    .adap_nr                    = 8,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x800,
    .i2c_filter                 = 0x804,
    .i2c_stretch                = 0x808,
    .i2c_ext_9548_exits_flag    = 0x80c,
    .i2c_ext_9548_addr          = 0x810,
    .i2c_ext_9548_chan          = 0x814,
    .i2c_in_9548_chan           = 0x818,
    .i2c_slave                  = 0x81c,
    .i2c_reg                    = 0x820,
    .i2c_reg_len                = 0x830,
    .i2c_data_len               = 0x834,
    .i2c_ctrl                   = 0x838,
    .i2c_status                 = 0x83c,
    .i2c_data_buf               = 0x880,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x2c,
    .i2c_reset_on               = 0x00000001,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data1 = {
    .adap_nr                    = 9,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x900,
    .i2c_filter                 = 0x904,
    .i2c_stretch                = 0x908,
    .i2c_ext_9548_exits_flag    = 0x90c,
    .i2c_ext_9548_addr          = 0x910,
    .i2c_ext_9548_chan          = 0x914,
    .i2c_in_9548_chan           = 0x918,
    .i2c_slave                  = 0x91c,
    .i2c_reg                    = 0x920,
    .i2c_reg_len                = 0x930,
    .i2c_data_len               = 0x934,
    .i2c_ctrl                   = 0x938,
    .i2c_status                 = 0x93c,
    .i2c_data_buf               = 0x980,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x2c,
    .i2c_reset_on               = 0x00000002,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data2 = {
    .adap_nr                    = 10,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0xa00,
    .i2c_filter                 = 0xa04,
    .i2c_stretch                = 0xa08,
    .i2c_ext_9548_exits_flag    = 0xa0c,
    .i2c_ext_9548_addr          = 0xa10,
    .i2c_ext_9548_chan          = 0xa14,
    .i2c_in_9548_chan           = 0xa18,
    .i2c_slave                  = 0xa1c,
    .i2c_reg                    = 0xa20,
    .i2c_reg_len                = 0xa30,
    .i2c_data_len               = 0xa34,
    .i2c_ctrl                   = 0xa38,
    .i2c_status                 = 0xa3c,
    .i2c_data_buf               = 0xa80,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x2c,
    .i2c_reset_on               = 0x00000004,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data3 = {
    .adap_nr                    = 11,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0xb00,
    .i2c_filter                 = 0xb04,
    .i2c_stretch                = 0xb08,
    .i2c_ext_9548_exits_flag    = 0xb0c,
    .i2c_ext_9548_addr          = 0xb10,
    .i2c_ext_9548_chan          = 0xb14,
    .i2c_in_9548_chan           = 0xb18,
    .i2c_slave                  = 0xb1c,
    .i2c_reg                    = 0xb20,
    .i2c_reg_len                = 0xb30,
    .i2c_data_len               = 0xb34,
    .i2c_ctrl                   = 0xb38,
    .i2c_status                 = 0xb3c,
    .i2c_data_buf               = 0xb80,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x2c,
    .i2c_reset_on               = 0x00000008,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data4 = {
    .adap_nr                    = 12,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0xc00,
    .i2c_filter                 = 0xc04,
    .i2c_stretch                = 0xc08,
    .i2c_ext_9548_exits_flag    = 0xc0c,
    .i2c_ext_9548_addr          = 0xc10,
    .i2c_ext_9548_chan          = 0xc14,
    .i2c_in_9548_chan           = 0xc18,
    .i2c_slave                  = 0xc1c,
    .i2c_reg                    = 0xc20,
    .i2c_reg_len                = 0xc30,
    .i2c_data_len               = 0xc34,
    .i2c_ctrl                   = 0xc38,
    .i2c_status                 = 0xc3c,
    .i2c_data_buf               = 0xc80,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x2c,
    .i2c_reset_on               = 0x00000010,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data5 = {
    .adap_nr                    = 13,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0xd00,
    .i2c_filter                 = 0xd04,
    .i2c_stretch                = 0xd08,
    .i2c_ext_9548_exits_flag    = 0xd0c,
    .i2c_ext_9548_addr          = 0xd10,
    .i2c_ext_9548_chan          = 0xd14,
    .i2c_in_9548_chan           = 0xd18,
    .i2c_slave                  = 0xd1c,
    .i2c_reg                    = 0xd20,
    .i2c_reg_len                = 0xd30,
    .i2c_data_len               = 0xd34,
    .i2c_ctrl                   = 0xd38,
    .i2c_status                 = 0xd3c,
    .i2c_data_buf               = 0xd80,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x2c,
    .i2c_reset_on               = 0x00000020,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data6 = {
    .adap_nr                    = 14,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0xe00,
    .i2c_filter                 = 0xe04,
    .i2c_stretch                = 0xe08,
    .i2c_ext_9548_exits_flag    = 0xe0c,
    .i2c_ext_9548_addr          = 0xe10,
    .i2c_ext_9548_chan          = 0xe14,
    .i2c_in_9548_chan           = 0xe18,
    .i2c_slave                  = 0xe1c,
    .i2c_reg                    = 0xe20,
    .i2c_reg_len                = 0xe30,
    .i2c_data_len               = 0xe34,
    .i2c_ctrl                   = 0xe38,
    .i2c_status                 = 0xe3c,
    .i2c_data_buf               = 0xe80,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x2c,
    .i2c_reset_on               = 0x00000040,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data7 = {
    .adap_nr                    = 15,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0xf00,
    .i2c_filter                 = 0xf04,
    .i2c_stretch                = 0xf08,
    .i2c_ext_9548_exits_flag    = 0xf0c,
    .i2c_ext_9548_addr          = 0xf10,
    .i2c_ext_9548_chan          = 0xf14,
    .i2c_in_9548_chan           = 0xf18,
    .i2c_slave                  = 0xf1c,
    .i2c_reg                    = 0xf20,
    .i2c_reg_len                = 0xf30,
    .i2c_data_len               = 0xf34,
    .i2c_ctrl                   = 0xf38,
    .i2c_status                 = 0xf3c,
    .i2c_data_buf               = 0xf80,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x2c,
    .i2c_reset_on               = 0x00000080,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data8 = {
    .adap_nr                    = 16,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x1000,
    .i2c_filter                 = 0x1004,
    .i2c_stretch                = 0x1008,
    .i2c_ext_9548_exits_flag    = 0x100c,
    .i2c_ext_9548_addr          = 0x1010,
    .i2c_ext_9548_chan          = 0x1014,
    .i2c_in_9548_chan           = 0x1018,
    .i2c_slave                  = 0x101c,
    .i2c_reg                    = 0x1020,
    .i2c_reg_len                = 0x1030,
    .i2c_data_len               = 0x1034,
    .i2c_ctrl                   = 0x1038,
    .i2c_status                 = 0x103c,
    .i2c_data_buf               = 0x1080,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x2c,
    .i2c_reset_on               = 0x00000100,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data9 = {
    .adap_nr                    = 17,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x1100,
    .i2c_filter                 = 0x1104,
    .i2c_stretch                = 0x1108,
    .i2c_ext_9548_exits_flag    = 0x110c,
    .i2c_ext_9548_addr          = 0x1110,
    .i2c_ext_9548_chan          = 0x1114,
    .i2c_in_9548_chan           = 0x1118,
    .i2c_slave                  = 0x111c,
    .i2c_reg                    = 0x1120,
    .i2c_reg_len                = 0x1130,
    .i2c_data_len               = 0x1134,
    .i2c_ctrl                   = 0x1138,
    .i2c_status                 = 0x113c,
    .i2c_data_buf               = 0x1180,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x2c,
    .i2c_reset_on               = 0x00000200,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data10 = {
    .adap_nr                    = 18,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x1200,
    .i2c_filter                 = 0x1204,
    .i2c_stretch                = 0x1208,
    .i2c_ext_9548_exits_flag    = 0x120c,
    .i2c_ext_9548_addr          = 0x1210,
    .i2c_ext_9548_chan          = 0x1214,
    .i2c_in_9548_chan           = 0x1218,
    .i2c_slave                  = 0x121c,
    .i2c_reg                    = 0x1220,
    .i2c_reg_len                = 0x1230,
    .i2c_data_len               = 0x1234,
    .i2c_ctrl                   = 0x1238,
    .i2c_status                 = 0x123c,
    .i2c_data_buf               = 0x1280,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x2c,
    .i2c_reset_on               = 0x00000400,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data11 = {
    .adap_nr                    = 19,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x1300,
    .i2c_filter                 = 0x1304,
    .i2c_stretch                = 0x1308,
    .i2c_ext_9548_exits_flag    = 0x130c,
    .i2c_ext_9548_addr          = 0x1310,
    .i2c_ext_9548_chan          = 0x1314,
    .i2c_in_9548_chan           = 0x1318,
    .i2c_slave                  = 0x131c,
    .i2c_reg                    = 0x1320,
    .i2c_reg_len                = 0x1330,
    .i2c_data_len               = 0x1334,
    .i2c_ctrl                   = 0x1338,
    .i2c_status                 = 0x133c,
    .i2c_data_buf               = 0x1380,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x2c,
    .i2c_reset_on               = 0x00000800,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data12 = {
    .adap_nr                    = 20,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x1400,
    .i2c_filter                 = 0x1404,
    .i2c_stretch                = 0x1408,
    .i2c_ext_9548_exits_flag    = 0x140c,
    .i2c_ext_9548_addr          = 0x1410,
    .i2c_ext_9548_chan          = 0x1414,
    .i2c_in_9548_chan           = 0x1418,
    .i2c_slave                  = 0x141c,
    .i2c_reg                    = 0x1420,
    .i2c_reg_len                = 0x1430,
    .i2c_data_len               = 0x1434,
    .i2c_ctrl                   = 0x1438,
    .i2c_status                 = 0x143c,
    .i2c_data_buf               = 0x1480,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x2c,
    .i2c_reset_on               = 0x00001000,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data13 = {
    .adap_nr                    = 21,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x1500,
    .i2c_filter                 = 0x1504,
    .i2c_stretch                = 0x1508,
    .i2c_ext_9548_exits_flag    = 0x150c,
    .i2c_ext_9548_addr          = 0x1510,
    .i2c_ext_9548_chan          = 0x1514,
    .i2c_in_9548_chan           = 0x1518,
    .i2c_slave                  = 0x151c,
    .i2c_reg                    = 0x1520,
    .i2c_reg_len                = 0x1530,
    .i2c_data_len               = 0x1534,
    .i2c_ctrl                   = 0x1538,
    .i2c_status                 = 0x153c,
    .i2c_data_buf               = 0x1580,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x2c,
    .i2c_reset_on               = 0x00002000,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data14 = {
    .adap_nr                    = 22,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x1600,
    .i2c_filter                 = 0x1604,
    .i2c_stretch                = 0x1608,
    .i2c_ext_9548_exits_flag    = 0x160c,
    .i2c_ext_9548_addr          = 0x1610,
    .i2c_ext_9548_chan          = 0x1614,
    .i2c_in_9548_chan           = 0x1618,
    .i2c_slave                  = 0x161c,
    .i2c_reg                    = 0x1620,
    .i2c_reg_len                = 0x1630,
    .i2c_data_len               = 0x1634,
    .i2c_ctrl                   = 0x1638,
    .i2c_status                 = 0x163c,
    .i2c_data_buf               = 0x1680,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x2c,
    .i2c_reset_on               = 0x00004000,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data15 = {
    .adap_nr                    = 23,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x1700,
    .i2c_filter                 = 0x1704,
    .i2c_stretch                = 0x1708,
    .i2c_ext_9548_exits_flag    = 0x170c,
    .i2c_ext_9548_addr          = 0x1710,
    .i2c_ext_9548_chan          = 0x1714,
    .i2c_in_9548_chan           = 0x1718,
    .i2c_slave                  = 0x171c,
    .i2c_reg                    = 0x1720,
    .i2c_reg_len                = 0x1730,
    .i2c_data_len               = 0x1734,
    .i2c_ctrl                   = 0x1738,
    .i2c_status                 = 0x173c,
    .i2c_data_buf               = 0x1780,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x2c,
    .i2c_reset_on               = 0x00008000,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga1_dom_i2c_bus_device_data0 = {
    .adap_nr                    = 24,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x100,
    .i2c_filter                 = 0x104,
    .i2c_stretch                = 0x108,
    .i2c_ext_9548_exits_flag    = 0x10c,
    .i2c_ext_9548_addr          = 0x110,
    .i2c_ext_9548_chan          = 0x114,
    .i2c_in_9548_chan           = 0x118,
    .i2c_slave                  = 0x11c,
    .i2c_reg                    = 0x120,
    .i2c_reg_len                = 0x130,
    .i2c_data_len               = 0x134,
    .i2c_ctrl                   = 0x138,
    .i2c_status                 = 0x13c,
    .i2c_data_buf               = 0x180,
    .dev_name                   = "/dev/fpga1",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 5,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x1c,
    .i2c_reset_on               = 0x00000001,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga1_dom_i2c_bus_device_data1 = {
    .adap_nr                    = 25,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x200,
    .i2c_filter                 = 0x204,
    .i2c_stretch                = 0x208,
    .i2c_ext_9548_exits_flag    = 0x20c,
    .i2c_ext_9548_addr          = 0x210,
    .i2c_ext_9548_chan          = 0x214,
    .i2c_in_9548_chan           = 0x218,
    .i2c_slave                  = 0x21c,
    .i2c_reg                    = 0x220,
    .i2c_reg_len                = 0x230,
    .i2c_data_len               = 0x234,
    .i2c_ctrl                   = 0x238,
    .i2c_status                 = 0x23c,
    .i2c_data_buf               = 0x280,
    .dev_name                   = "/dev/fpga1",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 5,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x1c,
    .i2c_reset_on               = 0x00000002,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga1_dom_i2c_bus_device_data2 = {
    .adap_nr                    = 26,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x300,
    .i2c_filter                 = 0x304,
    .i2c_stretch                = 0x308,
    .i2c_ext_9548_exits_flag    = 0x30c,
    .i2c_ext_9548_addr          = 0x310,
    .i2c_ext_9548_chan          = 0x314,
    .i2c_in_9548_chan           = 0x318,
    .i2c_slave                  = 0x31c,
    .i2c_reg                    = 0x320,
    .i2c_reg_len                = 0x330,
    .i2c_data_len               = 0x334,
    .i2c_ctrl                   = 0x338,
    .i2c_status                 = 0x33c,
    .i2c_data_buf               = 0x380,
    .dev_name                   = "/dev/fpga1",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 5,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x1c,
    .i2c_reset_on               = 0x00000004,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga1_dom_i2c_bus_device_data3 = {
    .adap_nr                    = 27,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x400,
    .i2c_filter                 = 0x404,
    .i2c_stretch                = 0x408,
    .i2c_ext_9548_exits_flag    = 0x40c,
    .i2c_ext_9548_addr          = 0x410,
    .i2c_ext_9548_chan          = 0x414,
    .i2c_in_9548_chan           = 0x418,
    .i2c_slave                  = 0x41c,
    .i2c_reg                    = 0x420,
    .i2c_reg_len                = 0x430,
    .i2c_data_len               = 0x434,
    .i2c_ctrl                   = 0x438,
    .i2c_status                 = 0x43c,
    .i2c_data_buf               = 0x480,
    .dev_name                   = "/dev/fpga1",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 5,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x1c,
    .i2c_reset_on               = 0x00000008,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga1_dom_i2c_bus_device_data4 = {
    .adap_nr                    = 28,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x500,
    .i2c_filter                 = 0x504,
    .i2c_stretch                = 0x508,
    .i2c_ext_9548_exits_flag    = 0x50c,
    .i2c_ext_9548_addr          = 0x510,
    .i2c_ext_9548_chan          = 0x514,
    .i2c_in_9548_chan           = 0x518,
    .i2c_slave                  = 0x51c,
    .i2c_reg                    = 0x520,
    .i2c_reg_len                = 0x530,
    .i2c_data_len               = 0x534,
    .i2c_ctrl                   = 0x538,
    .i2c_status                 = 0x53c,
    .i2c_data_buf               = 0x580,
    .dev_name                   = "/dev/fpga1",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 5,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x1c,
    .i2c_reset_on               = 0x00000010,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga1_dom_i2c_bus_device_data5 = {
    .adap_nr                    = 29,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x600,
    .i2c_filter                 = 0x604,
    .i2c_stretch                = 0x608,
    .i2c_ext_9548_exits_flag    = 0x60c,
    .i2c_ext_9548_addr          = 0x610,
    .i2c_ext_9548_chan          = 0x614,
    .i2c_in_9548_chan           = 0x618,
    .i2c_slave                  = 0x61c,
    .i2c_reg                    = 0x620,
    .i2c_reg_len                = 0x630,
    .i2c_data_len               = 0x634,
    .i2c_ctrl                   = 0x638,
    .i2c_status                 = 0x63c,
    .i2c_data_buf               = 0x680,
    .dev_name                   = "/dev/fpga1",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 5,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x1c,
    .i2c_reset_on               = 0x00000020,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga1_dom_i2c_bus_device_data6 = {
    .adap_nr                    = 30,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x700,
    .i2c_filter                 = 0x704,
    .i2c_stretch                = 0x708,
    .i2c_ext_9548_exits_flag    = 0x70c,
    .i2c_ext_9548_addr          = 0x710,
    .i2c_ext_9548_chan          = 0x714,
    .i2c_in_9548_chan           = 0x718,
    .i2c_slave                  = 0x71c,
    .i2c_reg                    = 0x720,
    .i2c_reg_len                = 0x730,
    .i2c_data_len               = 0x734,
    .i2c_ctrl                   = 0x738,
    .i2c_status                 = 0x73c,
    .i2c_data_buf               = 0x780,
    .dev_name                   = "/dev/fpga1",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 5,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x1c,
    .i2c_reset_on               = 0x00000040,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga1_dom_i2c_bus_device_data7 = {
    .adap_nr                    = 31,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x800,
    .i2c_filter                 = 0x804,
    .i2c_stretch                = 0x808,
    .i2c_ext_9548_exits_flag    = 0x80c,
    .i2c_ext_9548_addr          = 0x810,
    .i2c_ext_9548_chan          = 0x814,
    .i2c_in_9548_chan           = 0x818,
    .i2c_slave                  = 0x81c,
    .i2c_reg                    = 0x820,
    .i2c_reg_len                = 0x830,
    .i2c_data_len               = 0x834,
    .i2c_ctrl                   = 0x838,
    .i2c_status                 = 0x83c,
    .i2c_data_buf               = 0x880,
    .dev_name                   = "/dev/fpga1",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 5,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x1c,
    .i2c_reset_on               = 0x00000080,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga1_dom_i2c_bus_device_data8 = {
    .adap_nr                    = 32,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x900,
    .i2c_filter                 = 0x904,
    .i2c_stretch                = 0x908,
    .i2c_ext_9548_exits_flag    = 0x90c,
    .i2c_ext_9548_addr          = 0x910,
    .i2c_ext_9548_chan          = 0x914,
    .i2c_in_9548_chan           = 0x918,
    .i2c_slave                  = 0x91c,
    .i2c_reg                    = 0x920,
    .i2c_reg_len                = 0x930,
    .i2c_data_len               = 0x934,
    .i2c_ctrl                   = 0x938,
    .i2c_status                 = 0x93c,
    .i2c_data_buf               = 0x980,
    .dev_name                   = "/dev/fpga1",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 5,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x1c,
    .i2c_reset_on               = 0x00000100,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga1_dom_i2c_bus_device_data9 = {
    .adap_nr                    = 33,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0xa00,
    .i2c_filter                 = 0xa04,
    .i2c_stretch                = 0xa08,
    .i2c_ext_9548_exits_flag    = 0xa0c,
    .i2c_ext_9548_addr          = 0xa10,
    .i2c_ext_9548_chan          = 0xa14,
    .i2c_in_9548_chan           = 0xa18,
    .i2c_slave                  = 0xa1c,
    .i2c_reg                    = 0xa20,
    .i2c_reg_len                = 0xa30,
    .i2c_data_len               = 0xa34,
    .i2c_ctrl                   = 0xa38,
    .i2c_status                 = 0xa3c,
    .i2c_data_buf               = 0xa80,
    .dev_name                   = "/dev/fpga1",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 5,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x1c,
    .i2c_reset_on               = 0x00000200,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga1_dom_i2c_bus_device_data10 = {
    .adap_nr                    = 34,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0xb00,
    .i2c_filter                 = 0xb04,
    .i2c_stretch                = 0xb08,
    .i2c_ext_9548_exits_flag    = 0xb0c,
    .i2c_ext_9548_addr          = 0xb10,
    .i2c_ext_9548_chan          = 0xb14,
    .i2c_in_9548_chan           = 0xb18,
    .i2c_slave                  = 0xb1c,
    .i2c_reg                    = 0xb20,
    .i2c_reg_len                = 0xb30,
    .i2c_data_len               = 0xb34,
    .i2c_ctrl                   = 0xb38,
    .i2c_status                 = 0xb3c,
    .i2c_data_buf               = 0xb80,
    .dev_name                   = "/dev/fpga1",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 5,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x1c,
    .i2c_reset_on               = 0x00000400,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga1_dom_i2c_bus_device_data11 = {
    .adap_nr                    = 35,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0xc00,
    .i2c_filter                 = 0xc04,
    .i2c_stretch                = 0xc08,
    .i2c_ext_9548_exits_flag    = 0xc0c,
    .i2c_ext_9548_addr          = 0xc10,
    .i2c_ext_9548_chan          = 0xc14,
    .i2c_in_9548_chan           = 0xc18,
    .i2c_slave                  = 0xc1c,
    .i2c_reg                    = 0xc20,
    .i2c_reg_len                = 0xc30,
    .i2c_data_len               = 0xc34,
    .i2c_ctrl                   = 0xc38,
    .i2c_status                 = 0xc3c,
    .i2c_data_buf               = 0xc80,
    .dev_name                   = "/dev/fpga1",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 5,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x1c,
    .i2c_reset_on               = 0x00000800,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga1_dom_i2c_bus_device_data12 = {
    .adap_nr                    = 36,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0xd00,
    .i2c_filter                 = 0xd04,
    .i2c_stretch                = 0xd08,
    .i2c_ext_9548_exits_flag    = 0xd0c,
    .i2c_ext_9548_addr          = 0xd10,
    .i2c_ext_9548_chan          = 0xd14,
    .i2c_in_9548_chan           = 0xd18,
    .i2c_slave                  = 0xd1c,
    .i2c_reg                    = 0xd20,
    .i2c_reg_len                = 0xd30,
    .i2c_data_len               = 0xd34,
    .i2c_ctrl                   = 0xd38,
    .i2c_status                 = 0xd3c,
    .i2c_data_buf               = 0xd80,
    .dev_name                   = "/dev/fpga1",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 5,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x1c,
    .i2c_reset_on               = 0x00001000,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga1_dom_i2c_bus_device_data13 = {
    .adap_nr                    = 37,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0xe00,
    .i2c_filter                 = 0xe04,
    .i2c_stretch                = 0xe08,
    .i2c_ext_9548_exits_flag    = 0xe0c,
    .i2c_ext_9548_addr          = 0xe10,
    .i2c_ext_9548_chan          = 0xe14,
    .i2c_in_9548_chan           = 0xe18,
    .i2c_slave                  = 0xe1c,
    .i2c_reg                    = 0xe20,
    .i2c_reg_len                = 0xe30,
    .i2c_data_len               = 0xe34,
    .i2c_ctrl                   = 0xe38,
    .i2c_status                 = 0xe3c,
    .i2c_data_buf               = 0xe80,
    .dev_name                   = "/dev/fpga1",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 5,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x1c,
    .i2c_reset_on               = 0x00002000,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga1_dom_i2c_bus_device_data14 = {
    .adap_nr                    = 38,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0xf00,
    .i2c_filter                 = 0xf04,
    .i2c_stretch                = 0xf08,
    .i2c_ext_9548_exits_flag    = 0xf0c,
    .i2c_ext_9548_addr          = 0xf10,
    .i2c_ext_9548_chan          = 0xf14,
    .i2c_in_9548_chan           = 0xf18,
    .i2c_slave                  = 0xf1c,
    .i2c_reg                    = 0xf20,
    .i2c_reg_len                = 0xf30,
    .i2c_data_len               = 0xf34,
    .i2c_ctrl                   = 0xf38,
    .i2c_status                 = 0xf3c,
    .i2c_data_buf               = 0xf80,
    .dev_name                   = "/dev/fpga1",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 5,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x1c,
    .i2c_reset_on               = 0x00004000,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga1_dom_i2c_bus_device_data15 = {
    .adap_nr                    = 39,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x1000,
    .i2c_filter                 = 0x1004,
    .i2c_stretch                = 0x1008,
    .i2c_ext_9548_exits_flag    = 0x100c,
    .i2c_ext_9548_addr          = 0x1010,
    .i2c_ext_9548_chan          = 0x1014,
    .i2c_in_9548_chan           = 0x1018,
    .i2c_slave                  = 0x101c,
    .i2c_reg                    = 0x1020,
    .i2c_reg_len                = 0x1030,
    .i2c_data_len               = 0x1034,
    .i2c_ctrl                   = 0x1038,
    .i2c_status                 = 0x103c,
    .i2c_data_buf               = 0x1080,
    .dev_name                   = "/dev/fpga1",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 5,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x1c,
    .i2c_reset_on               = 0x00008000,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga1_dom_i2c_bus_device_data16 = {
    .adap_nr                    = 40,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x1100,
    .i2c_filter                 = 0x1104,
    .i2c_stretch                = 0x1108,
    .i2c_ext_9548_exits_flag    = 0x110c,
    .i2c_ext_9548_addr          = 0x1110,
    .i2c_ext_9548_chan          = 0x1114,
    .i2c_in_9548_chan           = 0x1118,
    .i2c_slave                  = 0x111c,
    .i2c_reg                    = 0x1120,
    .i2c_reg_len                = 0x1130,
    .i2c_data_len               = 0x1134,
    .i2c_ctrl                   = 0x1138,
    .i2c_status                 = 0x113c,
    .i2c_data_buf               = 0x1180,
    .dev_name                   = "/dev/fpga1",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 5,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x1c,
    .i2c_reset_on               = 0x00010000,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga1_dom_i2c_bus_device_data17 = {
    .adap_nr                    = 41,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x1200,
    .i2c_filter                 = 0x1204,
    .i2c_stretch                = 0x1208,
    .i2c_ext_9548_exits_flag    = 0x120c,
    .i2c_ext_9548_addr          = 0x1210,
    .i2c_ext_9548_chan          = 0x1214,
    .i2c_in_9548_chan           = 0x1218,
    .i2c_slave                  = 0x121c,
    .i2c_reg                    = 0x1220,
    .i2c_reg_len                = 0x1230,
    .i2c_data_len               = 0x1234,
    .i2c_ctrl                   = 0x1238,
    .i2c_status                 = 0x123c,
    .i2c_data_buf               = 0x1280,
    .dev_name                   = "/dev/fpga1",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 5,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x1c,
    .i2c_reset_on               = 0x00020000,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga1_dom_i2c_bus_device_data18 = {
    .adap_nr                    = 42,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x1300,
    .i2c_filter                 = 0x1304,
    .i2c_stretch                = 0x1308,
    .i2c_ext_9548_exits_flag    = 0x130c,
    .i2c_ext_9548_addr          = 0x1310,
    .i2c_ext_9548_chan          = 0x1314,
    .i2c_in_9548_chan           = 0x1318,
    .i2c_slave                  = 0x131c,
    .i2c_reg                    = 0x1320,
    .i2c_reg_len                = 0x1330,
    .i2c_data_len               = 0x1334,
    .i2c_ctrl                   = 0x1338,
    .i2c_status                 = 0x133c,
    .i2c_data_buf               = 0x1380,
    .dev_name                   = "/dev/fpga1",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 5,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x1c,
    .i2c_reset_on               = 0x00040000,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga1_dom_i2c_bus_device_data19 = {
    .adap_nr                    = 43,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x1400,
    .i2c_filter                 = 0x1404,
    .i2c_stretch                = 0x1408,
    .i2c_ext_9548_exits_flag    = 0x140c,
    .i2c_ext_9548_addr          = 0x1410,
    .i2c_ext_9548_chan          = 0x1414,
    .i2c_in_9548_chan           = 0x1418,
    .i2c_slave                  = 0x141c,
    .i2c_reg                    = 0x1420,
    .i2c_reg_len                = 0x1430,
    .i2c_data_len               = 0x1434,
    .i2c_ctrl                   = 0x1438,
    .i2c_status                 = 0x143c,
    .i2c_data_buf               = 0x1480,
    .dev_name                   = "/dev/fpga1",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 5,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x1c,
    .i2c_reset_on               = 0x00080000,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga1_dom_i2c_bus_device_data20 = {
    .adap_nr                    = 44,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x1500,
    .i2c_filter                 = 0x1504,
    .i2c_stretch                = 0x1508,
    .i2c_ext_9548_exits_flag    = 0x150c,
    .i2c_ext_9548_addr          = 0x1510,
    .i2c_ext_9548_chan          = 0x1514,
    .i2c_in_9548_chan           = 0x1518,
    .i2c_slave                  = 0x151c,
    .i2c_reg                    = 0x1520,
    .i2c_reg_len                = 0x1530,
    .i2c_data_len               = 0x1534,
    .i2c_ctrl                   = 0x1538,
    .i2c_status                 = 0x153c,
    .i2c_data_buf               = 0x1580,
    .dev_name                   = "/dev/fpga1",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 5,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x1c,
    .i2c_reset_on               = 0x00100000,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga1_dom_i2c_bus_device_data21 = {
    .adap_nr                    = 45,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x1600,
    .i2c_filter                 = 0x1604,
    .i2c_stretch                = 0x1608,
    .i2c_ext_9548_exits_flag    = 0x160c,
    .i2c_ext_9548_addr          = 0x1610,
    .i2c_ext_9548_chan          = 0x1614,
    .i2c_in_9548_chan           = 0x1618,
    .i2c_slave                  = 0x161c,
    .i2c_reg                    = 0x1620,
    .i2c_reg_len                = 0x1630,
    .i2c_data_len               = 0x1634,
    .i2c_ctrl                   = 0x1638,
    .i2c_status                 = 0x163c,
    .i2c_data_buf               = 0x1680,
    .dev_name                   = "/dev/fpga1",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 5,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x1c,
    .i2c_reset_on               = 0x00200000,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga1_dom_i2c_bus_device_data22 = {
    .adap_nr                    = 46,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x1700,
    .i2c_filter                 = 0x1704,
    .i2c_stretch                = 0x1708,
    .i2c_ext_9548_exits_flag    = 0x170c,
    .i2c_ext_9548_addr          = 0x1710,
    .i2c_ext_9548_chan          = 0x1714,
    .i2c_in_9548_chan           = 0x1718,
    .i2c_slave                  = 0x171c,
    .i2c_reg                    = 0x1720,
    .i2c_reg_len                = 0x1730,
    .i2c_data_len               = 0x1734,
    .i2c_ctrl                   = 0x1738,
    .i2c_status                 = 0x173c,
    .i2c_data_buf               = 0x1780,
    .dev_name                   = "/dev/fpga1",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 5,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x1c,
    .i2c_reset_on               = 0x00400000,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga1_dom_i2c_bus_device_data23 = {
    .adap_nr                    = 47,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x1800,
    .i2c_filter                 = 0x1804,
    .i2c_stretch                = 0x1808,
    .i2c_ext_9548_exits_flag    = 0x180c,
    .i2c_ext_9548_addr          = 0x1810,
    .i2c_ext_9548_chan          = 0x1814,
    .i2c_in_9548_chan           = 0x1818,
    .i2c_slave                  = 0x181c,
    .i2c_reg                    = 0x1820,
    .i2c_reg_len                = 0x1830,
    .i2c_data_len               = 0x1834,
    .i2c_ctrl                   = 0x1838,
    .i2c_status                 = 0x183c,
    .i2c_data_buf               = 0x1880,
    .dev_name                   = "/dev/fpga1",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 5,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x1c,
    .i2c_reset_on               = 0x00800000,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga1_dom_i2c_bus_device_data24 = {
    .adap_nr                    = 48,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x1900,
    .i2c_filter                 = 0x1904,
    .i2c_stretch                = 0x1908,
    .i2c_ext_9548_exits_flag    = 0x190c,
    .i2c_ext_9548_addr          = 0x1910,
    .i2c_ext_9548_chan          = 0x1914,
    .i2c_in_9548_chan           = 0x1918,
    .i2c_slave                  = 0x191c,
    .i2c_reg                    = 0x1920,
    .i2c_reg_len                = 0x1930,
    .i2c_data_len               = 0x1934,
    .i2c_ctrl                   = 0x1938,
    .i2c_status                 = 0x193c,
    .i2c_data_buf               = 0x1980,
    .dev_name                   = "/dev/fpga1",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 5,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x1c,
    .i2c_reset_on               = 0x01000000,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga1_dom_i2c_bus_device_data25 = {
    .adap_nr                    = 49,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x1a00,
    .i2c_filter                 = 0x1a04,
    .i2c_stretch                = 0x1a08,
    .i2c_ext_9548_exits_flag    = 0x1a0c,
    .i2c_ext_9548_addr          = 0x1a10,
    .i2c_ext_9548_chan          = 0x1a14,
    .i2c_in_9548_chan           = 0x1a18,
    .i2c_slave                  = 0x1a1c,
    .i2c_reg                    = 0x1a20,
    .i2c_reg_len                = 0x1a30,
    .i2c_data_len               = 0x1a34,
    .i2c_ctrl                   = 0x1a38,
    .i2c_status                 = 0x1a3c,
    .i2c_data_buf               = 0x1a80,
    .dev_name                   = "/dev/fpga1",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 5,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x1c,
    .i2c_reset_on               = 0x02000000,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga1_dom_i2c_bus_device_data26 = {
    .adap_nr                    = 50,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x1b00,
    .i2c_filter                 = 0x1b04,
    .i2c_stretch                = 0x1b08,
    .i2c_ext_9548_exits_flag    = 0x1b0c,
    .i2c_ext_9548_addr          = 0x1b10,
    .i2c_ext_9548_chan          = 0x1b14,
    .i2c_in_9548_chan           = 0x1b18,
    .i2c_slave                  = 0x1b1c,
    .i2c_reg                    = 0x1b20,
    .i2c_reg_len                = 0x1b30,
    .i2c_data_len               = 0x1b34,
    .i2c_ctrl                   = 0x1b38,
    .i2c_status                 = 0x1b3c,
    .i2c_data_buf               = 0x1b80,
    .dev_name                   = "/dev/fpga1",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 5,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x1c,
    .i2c_reset_on               = 0x04000000,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga1_dom_i2c_bus_device_data27 = {
    .adap_nr                    = 51,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x1c00,
    .i2c_filter                 = 0x1c04,
    .i2c_stretch                = 0x1c08,
    .i2c_ext_9548_exits_flag    = 0x1c0c,
    .i2c_ext_9548_addr          = 0x1c10,
    .i2c_ext_9548_chan          = 0x1c14,
    .i2c_in_9548_chan           = 0x1c18,
    .i2c_slave                  = 0x1c1c,
    .i2c_reg                    = 0x1c20,
    .i2c_reg_len                = 0x1c30,
    .i2c_data_len               = 0x1c34,
    .i2c_ctrl                   = 0x1c38,
    .i2c_status                 = 0x1c3c,
    .i2c_data_buf               = 0x1c80,
    .dev_name                   = "/dev/fpga1",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 5,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x1c,
    .i2c_reset_on               = 0x08000000,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga1_dom_i2c_bus_device_data28 = {
    .adap_nr                    = 52,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x1d00,
    .i2c_filter                 = 0x1d04,
    .i2c_stretch                = 0x1d08,
    .i2c_ext_9548_exits_flag    = 0x1d0c,
    .i2c_ext_9548_addr          = 0x1d10,
    .i2c_ext_9548_chan          = 0x1d14,
    .i2c_in_9548_chan           = 0x1d18,
    .i2c_slave                  = 0x1d1c,
    .i2c_reg                    = 0x1d20,
    .i2c_reg_len                = 0x1d30,
    .i2c_data_len               = 0x1d34,
    .i2c_ctrl                   = 0x1d38,
    .i2c_status                 = 0x1d3c,
    .i2c_data_buf               = 0x1d80,
    .dev_name                   = "/dev/fpga1",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 5,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x1c,
    .i2c_reset_on               = 0x10000000,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga1_dom_i2c_bus_device_data29 = {
    .adap_nr                    = 53,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x1e00,
    .i2c_filter                 = 0x1e04,
    .i2c_stretch                = 0x1e08,
    .i2c_ext_9548_exits_flag    = 0x1e0c,
    .i2c_ext_9548_addr          = 0x1e10,
    .i2c_ext_9548_chan          = 0x1e14,
    .i2c_in_9548_chan           = 0x1e18,
    .i2c_slave                  = 0x1e1c,
    .i2c_reg                    = 0x1e20,
    .i2c_reg_len                = 0x1e30,
    .i2c_data_len               = 0x1e34,
    .i2c_ctrl                   = 0x1e38,
    .i2c_status                 = 0x1e3c,
    .i2c_data_buf               = 0x1e80,
    .dev_name                   = "/dev/fpga1",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 5,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x1c,
    .i2c_reset_on               = 0x20000000,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga1_dom_i2c_bus_device_data30 = {
    .adap_nr                    = 54,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x1f00,
    .i2c_filter                 = 0x1f04,
    .i2c_stretch                = 0x1f08,
    .i2c_ext_9548_exits_flag    = 0x1f0c,
    .i2c_ext_9548_addr          = 0x1f10,
    .i2c_ext_9548_chan          = 0x1f14,
    .i2c_in_9548_chan           = 0x1f18,
    .i2c_slave                  = 0x1f1c,
    .i2c_reg                    = 0x1f20,
    .i2c_reg_len                = 0x1f30,
    .i2c_data_len               = 0x1f34,
    .i2c_ctrl                   = 0x1f38,
    .i2c_status                 = 0x1f3c,
    .i2c_data_buf               = 0x1f80,
    .dev_name                   = "/dev/fpga1",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 5,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x1c,
    .i2c_reset_on               = 0x40000000,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga1_dom_i2c_bus_device_data31 = {
    .adap_nr                    = 55,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x2000,
    .i2c_filter                 = 0x2004,
    .i2c_stretch                = 0x2008,
    .i2c_ext_9548_exits_flag    = 0x200c,
    .i2c_ext_9548_addr          = 0x2010,
    .i2c_ext_9548_chan          = 0x2014,
    .i2c_in_9548_chan           = 0x2018,
    .i2c_slave                  = 0x201c,
    .i2c_reg                    = 0x2020,
    .i2c_reg_len                = 0x2030,
    .i2c_data_len               = 0x2034,
    .i2c_ctrl                   = 0x2038,
    .i2c_status                 = 0x203c,
    .i2c_data_buf               = 0x2080,
    .dev_name                   = "/dev/fpga1",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 5,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x1c,
    .i2c_reset_on               = 0x80000000,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga1_i2c_bus_device_data0 = {
    .adap_nr                    = 56,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x2100,
    .i2c_filter                 = 0x2104,
    .i2c_stretch                = 0x2108,
    .i2c_ext_9548_exits_flag    = 0x210c,
    .i2c_ext_9548_addr          = 0x2110,
    .i2c_ext_9548_chan          = 0x2114,
    .i2c_in_9548_chan           = 0x2118,
    .i2c_slave                  = 0x211c,
    .i2c_reg                    = 0x2120,
    .i2c_reg_len                = 0x2130,
    .i2c_data_len               = 0x2134,
    .i2c_ctrl                   = 0x2138,
    .i2c_status                 = 0x213c,
    .i2c_data_buf               = 0x2180,
    .dev_name                   = "/dev/fpga1",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 5,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x3c,
    .i2c_reset_on               = 0x00000001,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga1_i2c_bus_device_data1 = {
    .adap_nr                    = 57,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x2200,
    .i2c_filter                 = 0x2204,
    .i2c_stretch                = 0x2208,
    .i2c_ext_9548_exits_flag    = 0x220c,
    .i2c_ext_9548_addr          = 0x2210,
    .i2c_ext_9548_chan          = 0x2214,
    .i2c_in_9548_chan           = 0x2218,
    .i2c_slave                  = 0x221c,
    .i2c_reg                    = 0x2220,
    .i2c_reg_len                = 0x2230,
    .i2c_data_len               = 0x2234,
    .i2c_ctrl                   = 0x2238,
    .i2c_status                 = 0x223c,
    .i2c_data_buf               = 0x2280,
    .dev_name                   = "/dev/fpga1",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 5,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x3c,
    .i2c_reset_on               = 0x00000002,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static void wb_fpga_i2c_bus_device_release(struct device *dev)
{
    return;
}

static struct platform_device fpga_i2c_bus_device[] = {
    {
        .name   = "wb-fpga-i2c",
        .id = 1,
        .dev    = {
            .platform_data  = &fpga_i2c_bus_device_data0,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 2,
        .dev    = {
            .platform_data  = &fpga_i2c_bus_device_data1,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 3,
        .dev    = {
            .platform_data  = &fpga_i2c_bus_device_data2,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 4,
        .dev    = {
            .platform_data  = &fpga_i2c_bus_device_data3,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 5,
        .dev    = {
            .platform_data  = &fpga_i2c_bus_device_data4,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 6,
        .dev    = {
            .platform_data  = &fpga_i2c_bus_device_data5,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 7,
        .dev    = {
            .platform_data  = &fpga_i2c_bus_device_data6,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 8,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data0,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 9,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data1,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 10,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data2,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 11,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data3,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 12,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data4,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 13,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data5,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 14,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data6,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 15,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data7,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 16,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data8,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 17,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data9,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 18,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data10,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 19,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data11,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 20,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data12,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 21,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data13,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 22,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data14,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 23,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data15,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 24,
        .dev    = {
            .platform_data  = &fpga1_dom_i2c_bus_device_data0,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 25,
        .dev    = {
            .platform_data  = &fpga1_dom_i2c_bus_device_data1,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 26,
        .dev    = {
            .platform_data  = &fpga1_dom_i2c_bus_device_data2,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 27,
        .dev    = {
            .platform_data  = &fpga1_dom_i2c_bus_device_data3,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 28,
        .dev    = {
            .platform_data  = &fpga1_dom_i2c_bus_device_data4,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 29,
        .dev    = {
            .platform_data  = &fpga1_dom_i2c_bus_device_data5,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 30,
        .dev    = {
            .platform_data  = &fpga1_dom_i2c_bus_device_data6,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 31,
        .dev    = {
            .platform_data  = &fpga1_dom_i2c_bus_device_data7,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 32,
        .dev    = {
            .platform_data  = &fpga1_dom_i2c_bus_device_data8,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 33,
        .dev    = {
            .platform_data  = &fpga1_dom_i2c_bus_device_data9,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 34,
        .dev    = {
            .platform_data  = &fpga1_dom_i2c_bus_device_data10,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 35,
        .dev    = {
            .platform_data  = &fpga1_dom_i2c_bus_device_data11,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 36,
        .dev    = {
            .platform_data  = &fpga1_dom_i2c_bus_device_data12,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 37,
        .dev    = {
            .platform_data  = &fpga1_dom_i2c_bus_device_data13,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 38,
        .dev    = {
            .platform_data  = &fpga1_dom_i2c_bus_device_data14,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 39,
        .dev    = {
            .platform_data  = &fpga1_dom_i2c_bus_device_data15,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 40,
        .dev    = {
            .platform_data  = &fpga1_dom_i2c_bus_device_data16,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 41,
        .dev    = {
            .platform_data  = &fpga1_dom_i2c_bus_device_data17,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 42,
        .dev    = {
            .platform_data  = &fpga1_dom_i2c_bus_device_data18,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 43,
        .dev    = {
            .platform_data  = &fpga1_dom_i2c_bus_device_data19,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 44,
        .dev    = {
            .platform_data  = &fpga1_dom_i2c_bus_device_data20,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 45,
        .dev    = {
            .platform_data  = &fpga1_dom_i2c_bus_device_data21,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 46,
        .dev    = {
            .platform_data  = &fpga1_dom_i2c_bus_device_data22,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 47,
        .dev    = {
            .platform_data  = &fpga1_dom_i2c_bus_device_data23,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 48,
        .dev    = {
            .platform_data  = &fpga1_dom_i2c_bus_device_data24,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 49,
        .dev    = {
            .platform_data  = &fpga1_dom_i2c_bus_device_data25,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 50,
        .dev    = {
            .platform_data  = &fpga1_dom_i2c_bus_device_data26,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 51,
        .dev    = {
            .platform_data  = &fpga1_dom_i2c_bus_device_data27,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 52,
        .dev    = {
            .platform_data  = &fpga1_dom_i2c_bus_device_data28,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 53,
        .dev    = {
            .platform_data  = &fpga1_dom_i2c_bus_device_data29,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 54,
        .dev    = {
            .platform_data  = &fpga1_dom_i2c_bus_device_data30,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 55,
        .dev    = {
            .platform_data  = &fpga1_dom_i2c_bus_device_data31,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 56,
        .dev    = {
            .platform_data  = &fpga1_i2c_bus_device_data0,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 57,
        .dev    = {
            .platform_data  = &fpga1_i2c_bus_device_data1,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
};

static int __init wb_fpga_i2c_bus_device_init(void)
{
    int i;
    int ret = 0;
    fpga_i2c_bus_device_t *fpga_i2c_bus_device_data;

    WB_FPGA_I2C_DEBUG_VERBOSE("enter!\n");
    for (i = 0; i < ARRAY_SIZE(fpga_i2c_bus_device); i++) {
        fpga_i2c_bus_device_data = fpga_i2c_bus_device[i].dev.platform_data;
        ret = platform_device_register(&fpga_i2c_bus_device[i]);
        if (ret < 0) {
            fpga_i2c_bus_device_data->device_flag = -1; /* device register failed, set flag -1 */
            printk(KERN_ERR "wb-fpga-i2c.%d register failed!\n", i + 1);
        } else {
            fpga_i2c_bus_device_data->device_flag = 0; /* device register suucess, set flag 0 */
        }
    }
    return 0;
}

static void __exit wb_fpga_i2c_bus_device_exit(void)
{
    int i;
    fpga_i2c_bus_device_t *fpga_i2c_bus_device_data;

    WB_FPGA_I2C_DEBUG_VERBOSE("enter!\n");
    for (i = ARRAY_SIZE(fpga_i2c_bus_device) - 1; i >= 0; i--) {
        fpga_i2c_bus_device_data = fpga_i2c_bus_device[i].dev.platform_data;
        if (fpga_i2c_bus_device_data->device_flag == 0) { /* device register success, need unregister */
            platform_device_unregister(&fpga_i2c_bus_device[i]);
        }
    }
}

module_init(wb_fpga_i2c_bus_device_init);
module_exit(wb_fpga_i2c_bus_device_exit);
MODULE_DESCRIPTION("FPGA I2C Devices");
MODULE_LICENSE("GPL");
MODULE_AUTHOR("support");
